package storage.sql;

/**
 * The SimpleDB version of the java.sql.ResultSet interface.
 * This interface implements a subset of the methods in that
 * interface. 
 * @author Edward Sciore
 */
public interface ResultSet {
	
	/**
	 * Moves to the next record in the result set.
	 * @return false if there are no more records
	 * @throws SQLException
	 */
	public boolean next()                   throws SQLException;
	
	/**
	 * Returns the integer value of the specified field
	 * in the current record of the result set.
	 * @param fldname the name of the field
	 * @return the integer value of that field in the current record
	 * @throws SQLException
	 */
	public int getInt(String fldname)       throws SQLException;
	
	/**
	 * Returns the string value of the specified field
	 * in the current record of the result set.
	 * @param fldname the name of the field
	 * @return the string value of that field in the current record
	 * @throws SQLException
	 */
	public String getString(String fldname) throws SQLException;
	
	/**
	 * Returns the metadata of the result set.
	 * @return the metadata of the result set
	 * @throws SQLException
	 */
	public ResultSetMetaData getMetaData()  throws SQLException;
	
	/**
	 * Closes the result set.
	 * @throws SQLException
	 */
	public void close()                     throws SQLException;
}

